package com.youlu.campus.service.auth;

import com.youlu.campus.entity.UserOtherInfo;
import com.youlu.campus.entity.VO.res.UserResponse;
import com.youlu.campus.entity.WechatH5UserPO;
import com.youlu.campus.entity.WechatMiniUserPO;
import com.youlu.campus.entity.domain.WechatAccessToken;

import java.util.Collection;
import java.util.List;

public interface WechatH5UserService {

    WechatH5UserPO findByOpenId(String openId, String appId);

    /**
     * openid 更新账户信息
     *
     * @param openid
     * @param userId
     * @param updateAccountUserId
     */
    void updateAccountId(String openid, String userId, String updateAccountUserId);

    void updateByOpenId(String openId, WechatAccessToken info);

    void updateById(String id,WechatAccessToken info);

    void updateOtherInfo(UserOtherInfo u);

    /**
     * 获取用户信息
     *
     * @param accessToken
     * @param openId
     */
    UserResponse getUserInfo(String accessToken, String openId,String id);

    /**
     * 通过账户id查询用户信息
     * @param accountIdList
     * @return
     */
    List<WechatH5UserPO> getWechatUserList(Collection<String> accountIdList);

    /**
     * 上传h5头像
     * @param wechatH5UserPO
     */
    void uploadH5WechatPic(WechatH5UserPO wechatH5UserPO);

    /**
     * 通过账户id查询用户信息
     * @param userId
     * @return
     */
    WechatH5UserPO findByAccountInfoId(String userId);
}
